package com.jzh.selfwallpaper.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class RaceLightConfig implements Parcelable {

    public int color;

    public float size;

    public String text;

    public RaceLightConfig() {
    }

    public RaceLightConfig(int color, float size, String text) {
        this.color = color;
        this.size = size;
        this.text = text;
    }

    protected RaceLightConfig(Parcel in) {
        color = in.readInt();
        text = in.readString();
        size = in.readFloat();
    }

    public static final Creator<RaceLightConfig> CREATOR = new Creator<RaceLightConfig>() {
        @Override
        public RaceLightConfig createFromParcel(Parcel in) {
            return new RaceLightConfig(in);
        }

        @Override
        public RaceLightConfig[] newArray(int size) {
            return new RaceLightConfig[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {

        dest.writeInt(color);
        dest.writeString(text);
        dest.writeFloat(size);
    }

    @Override
    public String toString() {
        return "RaceLightConfig{" +
                "color=" + color +
                ", size=" + size +
                ", text='" + text + '\'' +
                '}';
    }
}
